/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: ZJZ
 * @Date: 2021-08-09 09:29:17
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-04-25 14:12:45
 */
import request from "@/utils/request.js";

// 操作记录
export const OperationRecord = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/OperationRecord/list',
        params
    })
}

// 线索管理列表查询

//查询收款管理列表
export const getClueList = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/clue/list',
        params
    })
}

// 线索新增
export const newClue = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/add',
        data
    })
}

//转换为客户
export const convertCustomer = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/intoCustomer',
        data
    })
}

// 导出选中
export const exportSelect = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/export',
        data
    })
}
// 线索删除
export const clueDel = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/remove',
        data
    })
}
// 线索导出所有
export const importAll = () => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/exportAll'
    })
}
// 线索导出模版
export const exportTemplate = () => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/exportTemplate'
    })
}

// 导入员工

export const importInfo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/import',
        data
    })
}
// 写跟进
export const addFollowup = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/addFollowup',
        data
    })
}
// 获取更进
export const getActivity = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/getActivity',
        params
    })
}

// 获取活动详情
export const getActivityInfo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/getActivityInfo',
        params
    })
}

// 删除活动详情
export const delActivity = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/delActivity',
        params
    })
}

// 附件列表
export const getEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/getEnclosure',
        params
    })
}
// 附件删除
export const delEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/delEnclosure',
        params
    })
}
//重命名
export const rename = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/rename',
        params
    })
}
// 预览
export const preview = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/clue/preview',
        params
    })
}
// 线索编辑

export const updateClue = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/update',
        data
    })
}
// 更换负责人
export const changeDirector = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/changeDirector',
        params
    })
}
// 线索负责人
export const changeDirectorClue = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/clue/changeDirector',
        params
    })
}

// 高级筛选
export const queryScene = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/scene/queryScene',
        params
    })
}
// 编辑更进
export const updateFollowup = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/updateFollowup',
        data
    })
}
// 客户管理

// 列表查询
export const selectCustomerList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectCustomerList',
        params
    })
}
//查询公海
export const selectHighSeasList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectHighSeasList',
        params
    })
}
// 新增客户
export const addCustomer = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/add',
        data
    })
}
// 导出客户模版
export const exportTemplateCus = () => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/exportCustomerTemplate'
    })
}
// 导入客户
export const importInfoCus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/import',
        data
    })
}

// 获取更进
export const getActivityCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getActivity',
        params
    })
}

// 附件列表
export const getEnclosureCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getEnclosure',
        params
    })
}
// 附件删除
export const delEnclosureCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/delEnclosure',
        params
    })
}
//重命名
export const renameCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/rename',
        params
    })
}
// 预览
export const previewCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/preview',
        params
    })
}
// 客户导出所有
export const importAllCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/exportAll',
        params
    })
}
// 导出选中
export const importSelectCus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/export',
        data
    })
}


// 客户删除
export const delCus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/remove',
        data
    })
}
// 放入公海
export const putHighSeas = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/putHighSeas',
        data
    })
}
// 更换成交状态

export const changeStatus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/changeStatus',
        params
    })
}

// 公海删除
export const removeHighSeas = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/removeHighSeas',
        data
    })
}


// 公海导出选中

export const exportHighSeas = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/exportHighSeas',
        data
    })
}
// 公海领取
export const receive = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/receive',
        data
    })
}
// 公海分配
export const distribution = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/distribution',
        params
    })
}
// 潜在客户列表

export const selectPotentiaCustomerList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectPotentiaCustomerList',
        params
    })
}
// 解锁
export const unlock = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/unlock',
        data
    })
}
// 转换为客户
export const transf = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/transf',
        data
    })
}
// 客户编辑

export const khEdit = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/update',
        data
    })
}
// 新建联系人

export const addContact = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addContact',
        data
    })
}
// 查询联系人
export const selectContactList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectContactList',
        params
    })
}

// 新增商机

export const addOpportunity = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addOpportunity',
        data
    })
}

// 查询商机
export const selectOpportunityList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectOpportunityList',
        params
    })
}

// 获取客户附件列表
export const getCustomerEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getCustomerEnclosure',
        params
    })
}
// 删除客户附件
export const delCustomerEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/delCustomerEnclosure',
        params
    })
}

// 预览客户附件
export const previewCustomer = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/previewCustomer',
        params
    })
}

// 重命名客户附件
export const renameCustomer = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/renameCustomer',
        params
    })
}

// 查询公海商机
export const selectHighSeasOpportunityList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectHighSeasOpportunityList',
        params
    })
}
// 新增公海商机
export const addHighSeasOpportunity = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addHighSeasOpportunity',
        data
    })
}
// 查询公海联系人
export const selectHighSeasContactList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/selectHighSeasContactList',
        params
    })
}
// 新增公海联系人
export const addHighSeasContact = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addHighSeasContact',
        data
    })
}

// 获取公海附件列表
export const getGhCustomerEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getHighSeasEnclosure',
        params
    })
}
// 删除公海附件
export const delGhCustomerEnclosure = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/delHighSeasEnclosure',
        params
    })
}
// 预览公海附件
export const previewGhCustomer = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/previewHighSeas',
        params
    })
}

// 重命名公海附件
export const renameGhCustomer = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/renameCustomer',
        params
    })
}




// 联系人

// 联系人列表
export const getContactList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/list',
        params
    })
}


// 新建联系人
export const addContacts = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/add',
        data
    })
}
// 修改联系人
export const editContacts = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/edit',
        data
    })
}

// 关联客户列表
export const relationCustomerList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/selectCustomerList',
        params
    })
}
// 批量删除联系人
export const delContacts = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/remove',
        data
    })
}
// 更换负责人
export const changeDirectorCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/changeDirector',
        params
    })
}
// 获取联系人附件列表
export const getEnclosureCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/getEnclosure',
        params
    })
}
// 预览联系人附件
export const previewCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/preview',
        params
    })
}

// 重命名联系附件
export const renameCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/rename',
        params
    })
}
// 删除联系人附件
export const delEnclosureCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/delEnclosure',
        params
    })
}

// 导出联系人所有
export const exportAllCon = () => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/exportAll',

    })
}
// 导出联系人模版
export const exportTemplateCon = () => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/exportTemplate',
    })
}

// 导出联系人选中
export const exportCon = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/export',
        data
    })
}

// 联系人导入
export const importCon = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/import',
        data
    })
}


// 商机管理


// 商机列表请求
export const opportunityList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/list',
        params
    })
}
// 导出商机管理所有
export const opportunityExportAll = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/exportAll',
        params
    })
}
// 导出商机选中
export const opportunityExport = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/export',
        data
    })
}
// 新建商机
export const addOppo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/add',
        data
    })
}

// 修改商机
export const editOppo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/edit',
        data
    })
}

// 删除商机/
export const delOppo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/remove',
        data
    })
}

// 查询联系人
export const queryOppoCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/selectContactList',
        params
    })
}

// 新增联系人
export const addConOppo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/addContact',
        data
    })
}

// 查询商机附件
export const getEnclosureOppo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/getEnclosure',
        params
    })
}
// 查询进展
export const selectProgress = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/selectProgress',
        params
    })
}
// 更新进展
export const updateProgress = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/updateProgress',
        data
    })
}
// 商机更换负责人
export const changeDirectorBus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/changeDirector',
        params
    })
}

//导入商机

export const introduceInfo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/import',
        data
    })
}

// 删除商机附件
export const delEnclosureOppo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/delEnclosure',
        params
    })
}

// 预览商机附件
export const previewOppo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/preview',
        params
    })
}

// 重命名商机附件
export const renameOppo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/rename',
        params
    })
}
// 导出商机模版
export const exportOppo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/exportTemplate',
        params
    })
}

// 上传线索附件
export const importEnclosureClue = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/clue/importEnclosure',
        data
    })
}

// 上传客户附件
export const importCustomerEnclosure = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/importCustomerEnclosure',
        data
    })
}

// 上传公海附件
export const importHighSeasEnclosure = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/importHighSeasEnclosure',
        data
    })
}

// 上传联系人附件
export const importEnclosureCon = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/importEnclosure',
        data
    })
}
// 上传商机附件
export const importEnclosureOppo = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/importEnclosure',
        data
    })
}


// 客户活动
// 获取客户活动详情
export const getActivityInfoCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getActivityInfo',
        params
    })
}

// 删除客户活动
export const delActivityCus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/delActivity',
        params
    })
}
// 客户新增活动
export const addFollowupCus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addFollowup',
        data
    })
}

// 客户编辑活动
export const updateFollowupCus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/updateFollowup',
        data
    })
}

// 公海活动
// 获取公海活动列表
export const getHighSeasActivity = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getHighSeasActivity',
        params
    })
}

// 获取公海活动详情
export const getHighSeasActivityInfo = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/getHighSeasActivityInfo',
        params
    })
}

// 删除公海活动
export const delHighSeasActivity = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/customer/delHighSeasActivity',
        params
    })
}
// 公海新增活动
export const addHighSeasFollowup = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/addHighSeasFollowup',
        data
    })
}

// 公海编辑活动
export const updateHighSeasFollowup = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/customer/updateHighSeasFollowup',
        data
    })
}

// 联系人活动
// 获取活动列表
export const getActivityCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/getActivity',
        params
    })
}
// 获取活动详情
export const getActivityInfoCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/getActivityInfo',
        params
    })
}

// 删除联系人活动
export const delActivityCon = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/contact/delActivity',
        params
    })
}
// 联系人新增活动
export const addFollowupCon = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/addFollowup',
        data
    })
}

// 联系人编辑活动
export const updateFollowupCon = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/contact/updateFollowup',
        data
    })
}


// 商机活动
// 获取活动列表
export const getActivityBus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/getActivity',
        params
    })
}
// 获取活动详情
export const getActivityInfoBus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/getActivityInfo',
        params
    })
}

// 删除联系人活动
export const delActivityBus = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/opportunity/delActivity',
        params
    })
}
// 联系人新增活动
export const addFollowupBus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/addFollowup',
        data
    })
}

// 联系人编辑活动
export const updateFollowupBus = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/opportunity/updateFollowup',
        data
    })
}

// 获取更进方式
export const furtherList = params => {
    return request({
        method: 'get',
        url: `/serviceProvide/stepType/list`,
        params
    })
}

// 商机组列表
export const opportunityStatusGroup = params => {
    return request({
        method: 'get',
        url: `/serviceProvide/opportunityStatusGroup/list`,
        params
    })
}

// - 获取合同列表
export const contractList = params => {
    return request({
        method: 'get',
        url: `/serviceProvide/customer/contractList`,
        params
    })
}
// - 获取回款计划列表
export const recoveryPlanList = params => {
    return request({
        method: 'get',
        url: `/serviceProvide/customer/recoveryPlanList`,
        params
    })
}
// - 获取回款列表
export const recoveryList = params => {
    return request({
        method: 'get',
        url: `/serviceProvide/customer/recoveryList`,
        params
    })
}

